﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KinectedMusic.Kinect
{
    public class ColourBox
    {
        public ColourBox(ColourJoint hip, ColourJoint shoulder)
        {
            this.Z = (hip.Z + shoulder.Z) / 2.0f;
            this.Depth = this.Z + .3f;
            int diffY = (int)(Math.Abs(shoulder.Y - hip.Y) * 1.5);
            int centreX = (hip.X + shoulder.X) / 2;
            this.X = centreX - diffY;
            this.Width = diffY * 2;
            this.Y = shoulder.Y - diffY;
            this.Height = diffY * 2;
        }

        public int X { get; set; }
        public int Y { get; set; }
        public float Z { get; set; }
        public int Width { get; set; }
        public int Height { get; set; }
        public float Depth { get; set; }
    }
}
